Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: #495 - new "action" element for knowledge panels #496

Merged
merged 6 commits into from
Jun 29, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • KnowledgePanelElement.dart: added KnowledgePanelActionElement
  • KnowledgePanelElement.g.dart: generated
  • main.dart: unrelated minor fix.

What

  • New "action" element for knowledge panels.
  • Typical json code:
{
	"action_element": {
		"actions": ["add_categories", "add_nutrition_facts"],
		"html": "Could you add the information needed to compute the Nutri-Score?"
	},
	"element_type": "action"
}

Fixes bug(s)

Part of

monsieurtanuki and others added 6 commits June 7, 2022 22:28
…ment

Impacted files:
* `api_saveProduct_test.dart`: unrelated test skip
* `KnowlegdePanelElement.dart`: `title` is now optional
* `KnowlegdePanelElement.g.dart`: generated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Conflicts:
#	CHANGELOG.md
#	version.txt
Impacted files:
* `KnowledgePanelElement.dart`: added `KnowledgePanelActionElement`
* `KnowledgePanelElement.g.dart`: generated
* `main.dart`: unrelated minor fix.
@codecov-commenter
Copy link

Codecov Report

Merging #496 (96b9b4e) into master (4e7ffb2) will decrease coverage by 0.23%.
The diff coverage is 13.04%.

@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
- Coverage   83.23%   83.00%   -0.24%     
==========================================
  Files         169      169              
  Lines        7309     7338      +29     
==========================================
+ Hits         6084     6091       +7     
- Misses       1225     1247      +22     
Impacted Files Coverage Δ
lib/model/KnowledgePanelElement.dart 39.70% <0.00%> (-3.16%) ⬇️
lib/model/KnowledgePanelElement.g.dart 40.60% <8.33%> (-2.54%) ⬇️
lib/utils/HttpHelper.dart 85.71% <33.33%> (-6.29%) ⬇️
lib/openfoodfacts.dart 78.36% <0.00%> (-0.52%) ⬇️
lib/model/Product.dart 73.10% <0.00%> (ø)
lib/utils/ProductFields.dart 83.33% <0.00%> (ø)
lib/model/Product.g.dart 96.87% <0.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e7ffb2...96b9b4e. Read the comment docs.

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Knowledge panels: add new "action" element
4 participants